package org.budo.support.spring.web.servlet.exception.resolver;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.budo.support.slf4j.Slf4j;
import org.slf4j.Logger;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author lmw
 */
public class BudoSpringMvcHandlerExceptionResolver implements HandlerExceptionResolver {
    private static final Logger log = Slf4j.getLogger();

    @Override
    public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {
        log.error("#19 resolveException request=" + request + ", handler=" + handler, ex);
        return null; // 返回空，走 error-page 配置
    }
}